//logs.js
const app = getApp()
var module=require("../../utils/youwan.js");
var lang=app.globalData.lang;
Page({
  data: {
  	language:'',
  },
  onLoad: function () {
    var lang = app.globalData.lang;
    if (lang != "zh") {
      wx.setNavigationBarTitle({
        title: 'Play'
      })
    }
    this.setData({
      language:app.globalData.lang
    });
  },
  tap:function(e){
  	const type=e.currentTarget.dataset.type;
    var title = '';
    switch(type){
      case 'laomalu': { 
        var url = this.data.language == 'zh' ? 'https://jbh.meituan.com/cn/pages/spot.html' : 'https://jbh.meituan.com/en/pages/spot.html';
        title = this.data.language == 'zh' ? '寻找人气景点中' : '寻找人气景点中';
         } break;
      case 'jingdian': {
        var url = this.data.language == 'zh' ? 'https://m.meet-in-shanghai.net/cn/2018ciie/' : 'https://m.meet-in-shanghai.net/en/2018ciie/';
        title = this.data.language == 'zh' ? '正在为您呈现中' : '正在为您呈现中';
        }break;
    }
    // if (type =='jingdian')
    // {
    //   wx.showToast({
    //     title: '此功能暂未开放，请持续关注！',
    //     icon: 'none',
    //     duration: 2000
    //   });
    // }else{
      wx.navigateTo({
        url: '/pages/h5/index?url=' + url + '&title=' + title
    })
    //   wx.showToast({
    //     title: '此功能暂未开放，请持续关注！',
    //     icon: 'none',
    //     duration: 2000
    //   });
    // }
  
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
    var that = this;
    return {
      title: app.globalData.shareTitle,
      path: app.globalData.sharePath,
      imageUrl: '../../../../images/share_img.png',
      success: function (res) {
        // 转发成功
      },
      fail: function (res) {
        // 转发失败
      }
    }
  },
})